#include <bits/stdc++.h>

using namespace std;

int main() {
    string a, b;
    cin >> a >> b;

    bool flag = false;

    for (int i = 0; i < 26; i++) {
        string c = a;
        for (int j = 0; j < c.size(); j++) {
            c[j] = (char)(a[j] + i);
            if (c[j] > 'z' || c[j] < 0) {
                c[j] = (char) (a[j] - 26 + i);
            }
        }

        if (c == b) {
            flag = true;
            break;
        }
    }
    puts(flag ? "Yes" : "No");
    return 0;
}